home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / NEW_TECH / IBM4MI.ZIP / OEMSETUP.INF < prev    next >
INI File  |  1993-07-24  |  18KB  |  543 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = TAPE
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26. ;-----------------------------------------------------------------------
  27. ; OPTION LIST
  28. ; -----------
  29. ; This section lists the Option key names.  These keys are locale
  30. ; independent and used to represent the option in a locale independent
  31. ; manner.
  32. ;
  33. ;-----------------------------------------------------------------------
  34.  
  35. [Options]
  36.     4MMIBM   = 4mmibm
  37.  
  38. ;-----------------------------------------------------------------------
  39. ; OPTION TEXT SECTION
  40. ; -------------------
  41. ; These are text strings used to identify the option to the user.  There
  42. ; are separate sections for each language supported.  The format of the
  43. ; section name is "OptionsText" concatenated with the Language represented
  44. ; by the section.
  45. ;
  46. ;-----------------------------------------------------------------------
  47.  
  48. [OptionsTextENG]
  49.     4MMIBM   = "IBM 4mm DAT (API version)"
  50.  
  51. ;-----------------------------------------------------------------------------------------
  52. ; TAPE CLASS DRIVERS:
  53. ;
  54. ; Order of the information:
  55. ;
  56. ; Class driver = Type, Group, ErrorControl, Dependencies, EventMessageFile, TypesSupported
  57. ;
  58. ; NOTE: \ in the dependency list means that the dependency is on a group.
  59. ;-----------------------------------------------------------------------------------------
  60.  
  61. [ClassDrivers]
  62.     4mmibm   = !SERVICE_KERNEL_DRIVER, "SCSI Class" , !SERVICE_ERROR_NORMAL, "\SCSI Miniport", "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\4mmibm.sys"   , 7
  63.  
  64.  
  65. ;---------------------------------------------------------------------------
  66. ; 1. Identify
  67. ;
  68. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  69. ;                as we are choosing currently.
  70. ;
  71. ; INPUT:         None
  72. ;
  73. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  74. ;                $($R1): Option Type (COMPUTER ...)
  75. ;                $($R2): Diskette description
  76. ;---------------------------------------------------------------------------
  77.  
  78. [Identify]
  79.     ;
  80.     ;
  81.     read-syms Identification
  82.  
  83.     set Status     = STATUS_SUCCESSFUL
  84.     set Identifier = $(OptionType)
  85.     set Media      = #("Source Media Descriptions", 1, 1)
  86.  
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92. ; 2. ReturnOptions:
  93. ;
  94. ; DESCRIPTION:   To return the option list supported by this INF and the
  95. ;                localised text list representing the options.
  96. ;
  97. ;
  98. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  99. ;
  100. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  101. ;                                STATUS_NOLANGUAGE
  102. ;                                STATUS_FAILED
  103. ;
  104. ;                $($R1): Option List
  105. ;                $($R2): Option Text List
  106. ;------------------------------------------------------------------------
  107.  
  108. [ReturnOptions]
  109.     ;
  110.     ;
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.  
  115.     ;
  116.     ; Check if the language requested is supported
  117.     ;
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.         goto returnoptions
  121.     else
  122.         set Status = STATUS_NOLANGUAGE
  123.         goto finish_ReturnOptions
  124.     endif
  125.  
  126.     ;
  127.     ; form a list of all the options and another of the text representing
  128.     ;
  129.  
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 0)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134.  
  135. finish_ReturnOptions = +
  136.     Return $(Status) $(OptionList) $(OptionTextList)
  137.  
  138.  
  139. ;------------------------------------------------------------------------
  140. ; 3. InstallOption:
  141. ;
  142. ; FUNCTION:  To copy files representing Options
  143. ;            To configure the installed option
  144. ;            To update the registry for the installed option
  145. ;
  146. ; INPUT:     $($0):  Language to use
  147. ;            $($1):  OptionID to install
  148. ;            $($2):  SourceDirectory
  149. ;            $($3):  AddCopy  (YES | NO)
  150. ;            $($4):  DoCopy   (YES | NO)
  151. ;            $($5):  DoConfig (YES | NO)
  152. ;
  153. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  154. ;                            STATUS_NOLANGUAGE |
  155. ;                            STATUS_USERCANCEL |
  156. ;                            STATUS_FAILED
  157. ;------------------------------------------------------------------------
  158.  
  159. [InstallOption]
  160.  
  161.     ;
  162.     ; Set default values for
  163.     ;
  164.     set Status   = STATUS_FAILED
  165.     set DrivesToFree = {}
  166.  
  167.     ;
  168.     ; Check if NONE or UNKNOWN
  169.     ;
  170.     ifstr(i) $($1) == NONE
  171.         set Status = STATUS_SUCCESSFUL
  172.         goto finish_InstallOption
  173.     else-ifstr(i) $($1) == UNKNOWN
  174.         set Status = STATUS_SUCCESSFUL
  175.         goto finish_InstallOption
  176.     endif
  177.  
  178.     ;
  179.     ; extract parameters
  180.     ;
  181.     set Option   = $($1)
  182.     set SrcDir   = $($2)
  183.     set AddCopy  = $($3)
  184.     set DoCopy   = $($4)
  185.     set DoConfig = $($5)
  186.  
  187.     ;
  188.     ; Check if the language requested is supported
  189.     ;
  190.     set LanguageList = ^(LanguagesSupported, 1)
  191.     Ifcontains(i) $($0) in $(LanguageList)
  192.     else
  193.         set Status = STATUS_NOLANGUAGE
  194.         goto finish_InstallOption
  195.     endif
  196.     read-syms Strings$($0)
  197.  
  198.     ;
  199.     ; check to see if Option is supported.
  200.     ;
  201.  
  202.     set OptionList = ^(Options, 0)
  203.     ifcontains $(Option) in $(OptionList)
  204.     else
  205.         goto finish_InstallOption
  206.     endif
  207.     set OptionList = ""
  208.  
  209.     ;
  210.     ; Option has been defined already
  211.     ;
  212.  
  213.     set ClassDriver      =   #(Options,      $(Option),      1)
  214.     set Type             = $(#(ClassDrivers, $(ClassDriver), 1))
  215.     set Group            =   #(ClassDrivers, $(ClassDriver), 2)
  216.     set ErrorControl     = $(#(ClassDrivers, $(ClassDriver), 3))
  217.     set Dependencies     =   #(ClassDrivers, $(ClassDriver), 4)
  218.     set EventMessageFile =   #(ClassDrivers, $(ClassDriver), 5)
  219.     set TypesSupported   =   #(ClassDrivers, $(ClassDriver), 6)
  220.  
  221. installtheoption = +
  222.  
  223.     ;
  224.     ; Code to add files to copy list
  225.     ;
  226.  
  227.     ifstr(i) $(AddCopy) == "YES"
  228.         set DoActualCopy = NO
  229.         set FileToCheck = #(Files-TapeClassDrivers, $(ClassDriver), 2)
  230.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  231.         ifstr(i) $(STATUS) == NO
  232.             set DoActualCopy = YES
  233.         endif
  234.  
  235.         ifstr(i) $(DoActualCopy) == NO
  236.             shell "subroutn.inf" DriversExist $($0) $(String1)
  237.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.                 Debug-Output "TAPE.INF: shelling DriversExist failed"
  239.                 goto finish_InstallOption
  240.             endif
  241.  
  242.             ifstr(i) $($R0) == STATUS_CURRENT
  243.             else-ifstr(i) $($R0) == STATUS_NEW
  244.                 set DoActualCopy = YES
  245.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  246.                 Debug-Output "TAPE.INF: User cancelled Tape installation"
  247.                 goto finish_InstallOption
  248.             else
  249.                 Debug-Output "TAPE.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  250.                 goto finish_InstallOption
  251.             endif
  252.         endif
  253.  
  254.         ifstr(i) $(DoActualCopy) == YES
  255.  
  256.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  257.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  258.                 Debug-Output "TAPE.INF: shelling DoAskSource failed"
  259.